@extends('front.layout')
@section('title')
    Citrulluss
@endsection
@section('content')
    <link rel="stylesheet" href="{{asset('css/base.css')}}">
    <div class="container portfolio center-align">
        <h5>&nbsp;</h5>

        <h5>Citrulluss Blog</h5>
        <h6>VISUAL DESIGN •  VECTORS  • &nbsp;ILLUSTRATIONS  •  CODE </h6>
        <h5>&nbsp;</h5>
    </div>


    <div class="container">
        <div id="timeline">

        @foreach($posts as $post )
                <div class="timeline-item">
                    <div class="timeline-icon">
                        <img src="{{asset('css/star.svg')}}">
                    </div>
            @if ($loop->first)
                    <div class="timeline-content">

            @elseif (($loop->index)%2==0)
                    <div class="timeline-content">
            @else
                    <div class="timeline-content right">
                @endif

                        <span class="new badge teal lighten-2"  data-badge-caption=" ">{{date("Y M D",strtotime($post->created_at))}}</span>
                        <a href="{{route('post.show',$post->id)}}"><h2>{{$post->title}}</h2></a>
                        <p>{{strlen($post->body)>100?mb_substr($post->body,0,50)."...":$post->body}}</p>
                    </div>
                </div>
        @endforeach
            </div>
        </div>
    </div>
    </div>

@endsection


